<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page import="java.util.*,cn.edu.lingnan.dto.*" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>导游信息页面</title>
<link rel="stylesheet" href="css/FormStyle.css">
</head>
<body>

	<h1>导游信息展示如下</h1>
<script type="text/javascript" src="../js/FindAllGuide.js"></script>
<table  class="table" border="1" cellspacing="0" align="center">
	<tr>
		<td>
			<input id="btn1" type="button" value="全选" onclick="allcheck();"/>
			<input id="btn2" type="button" value="重置" onclick="allnotcheck();"/>
		</td>
		<td>导游编号</td>
		<td>导游姓名</td>
		<td>性别</td>
		<td>密码</td>
		<td>管理员权限</td>
		<td>
			<input id="btn3" type="button" value="批量删除" onclick="deleteall();"/>
		</td>
	</tr>	
	<%
	Vector<GuideDTO> v=(Vector<GuideDTO>) session.getAttribute("AllGuideInfo");//FindAllGuideServlet里set好了
	Iterator<GuideDTO> it=v.iterator();	
	GuideDTO guide=null;
	while(it.hasNext()){
		guide=it.next();
	%>
		<tr>
		<td>
			<input type="checkbox" name="check" value=<%=guide.getG_no()%>>
		</td>
		<td><%=guide.getG_no()%></td>
		<td><%=guide.getG_name()%></td>
		<td><%=guide.getG_sex()%></td>
		<td><%=guide.getPassword()%></td>
		<td><%=guide.getAdminister()%></td>
		<td>
		  <a href="UpdateGuide.jsp?gno=<%=guide.getG_no()%>">修改</a>
		  <a href="DeleteGuide?gno=<%=guide.getG_no()%>" onclick="return confirm('您确定要删除该条记录吗？')">删除</a>
		</td>
		</tr>	
	<% 
	}	
	%>
</table>
</body>
</html>